import { clearAuthData } from "@/utils";
import { useEffect } from "react";
import { useLocation, useNavigate } from "react-router";

const Home = () => {
    const location = useLocation();
    const navigate = useNavigate();
    useEffect(() => {
        const token = localStorage.token;
        if (token) return;
        clearAuthData();
        navigate("/login", { replace: true });
    }, [location]);
    return <div>Home</div>;
};

export default Home;
